import React from 'react';
import { connect } from 'dva';
import PageContent from '../../../components/PageContent';
import Panel from './Panel';
// 将组件与dva树做关联，user：是指model对应的namespace名字，loading： 是dva提供的用于监听某个model的 异步请求的状态，若正在请求，则loading值为true
@connect(({ analysis, loading }) => ({ analysis, loading: loading.models.analysis }))

class VersionPlan extends React.Component {// VersionPlan为任意命名的组件名
  render() {
    const { dispatch, loading, analysis: { versionPlan, paginal } } = this.props;
    const panelProps = {
      dispatch,
      loading,
      paginal,
      versionPlan,
    };
    return (
      <PageContent title="VersionPlan">
        <Panel {...panelProps} />
      </PageContent>
    );
  }
}

export default VersionPlan;
